# encoding: utf-8

## mouse event type
meSINGLEDOWN = 0x0011
meSINGLEUP = 0x0012
meSINGLEDELAYED = 0x0013
meDOUBLEDOWN = 0x0021
meDOUBLEUP = 0x0022
meDRAGSTART = 0x0100
meDRAGOVER = 0x0200
meDRAGDROP = 0x0300

## mouse key
mouseNone = 1
mouseL = 2
mouseR = 3
mouseM = 4

## meta key
mkSHIFT = 1
mkCTRL  = 2
mkALT   = 4

## dragdrop effect
deNONE   = 0
deCOPY   = 1
deMOVE   = 2
deLINK   = 4

## virtual key
vkCOLON = 186
vkUP    = 38
vkDOWN  = 40
vkSPACE = 32
vkAPPLICATION = 93
vkENTER = 13
vkBACKSPACE = 8

def vk (char):
  if len(char) == 1:
    if 'A' <= char and char <= 'Z':
      return ord(char)
    elif 'a' <= char and char <= 'z':
      return ord(char) - 32
    else:
      raise Exception('Unsupported char: ' + char)
  else:
    raise Exception('Unsupported char: ' + char)

## color
clWhite = 0xFFFFFF
clBlack = 0x000000
clSkyBlue = 0xF0CAA6
clCream = 0xF0FBFF
clLime = 0x00FF00
clSilver = 0xC0C0C0

## charset
csANSI = 0
csSHIFTJIS = 128

## font pitch
fpDefault = u'default'
fpFixed = u'fixed'
fpVariable = u'variable'
